﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using HsTec.DigitalPlatform.DataAccess;

namespace HsTec.DigitalPlatform.Business
{
    public class MenuInfoManager
    {
        MenuInfoRepository menuinforepository = new MenuInfoRepository();

        public void Add(MenuInfo menuinfo)
        {
            menuinforepository.Add(menuinfo);
        }

        public void Delete(MenuInfo menuinfo)
        {
            menuinforepository.Delete(menuinfo);
        }

        public MenuInfo GetMenuInfoByID(int id)
        {
            return menuinforepository.GetMenuInfoByID(id);
        }

        public IQueryable<MenuInfo> FindALLMenuInfo()
        {
            return menuinforepository.FindALLMenuInfo();
        }

        public IQueryable<MenuInfo> FindChildMenuInfoByParentID(int id)
        {
            return menuinforepository.FindChildMenuInfoByParentID(id);
        }

        public MenuInfo GetRoot()
        {
            return menuinforepository.GetRoot();
        }
    }
}
